const {database} = require("@common/config")

class UserService{
  async searchUserInfoById(id){
    try {
      const statement = `SELECT id,phone,createAt,updateAt FROM wx_user WHERE id = ?`
      const [result] = await database.promise().execute(statement,[id])
      return result[0] ?? []
    } catch (err) {
      throw new Error(err)
    }
  }
}

module.exports = new UserService()